package homework03;

/**
 * 用户消费信息类 特征：统计通话时长、统计上网流量、每月消费金额
 */
public class UserCost {
    private int talk_time;  //通话时长
    private int flow;       //上网流量
    private int cost;       //消费金额

    public UserCost() {
    }

    public UserCost(int talk_time, int flow, int cost) {
        setTalk_time(talk_time);
        setFlow(flow);
        setCost(cost);
    }

    public int getTalk_time() {
        return talk_time;
    }

    public void setTalk_time(int talk_time) {
        this.talk_time = talk_time;
    }

    public int getFlow() {
        return flow;
    }

    public void setFlow(int flow) {
        this.flow = flow;
    }

    public int getCost() {
        return cost;
    }

    public void setCost(int cost) {
        this.cost = cost;
    }

    //统计用户套餐使用情况并打印
    public void show() {
        System.out.println("使用通话时长：" + getTalk_time() + "分钟，使用流量：" + getFlow() + "M，消费金额：" + getCost() + "元");
    }

}
